xen.git
19 years ago[IA64] do not use interrupt_mask_addr inside Xen
awilliam@xenbuild.aw [Thu, 15 Jun 2006 14:42:34 +0000 (08:42 -0600)]
[IA64] do not use interrupt_mask_addr inside Xen

Create current_psr_i_addr per cpu variables.
Inside Xen, do not use interrupt_mask_addr because it can be modified by
the guest.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[IA64] let VMM do itc sync for guest on VTI domain
awilliam@xenbuild.aw [Wed, 14 Jun 2006 22:05:45 +0000 (16:05 -0600)]
[IA64] let VMM do itc sync for guest on VTI domain

Previously, on SMP VTI-domain, Guest OS was responsible for
syncing itc by calling ia64_sync_itc, but the round trip may
be very large on VTI domain, that may cause guest itcs are
not synced well and cause guest wall clock is not accurate.

This patch intends to fix this issue, when guest wants to sync
itc( vcpus other than vcpu0 write itc), VMM directly get vcpu0
itc for other vcpus.

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
19 years ago[IA64] cleanup warnings in mm.c
awilliam@xenbuild.aw [Wed, 14 Jun 2006 22:05:44 +0000 (16:05 -0600)]
[IA64] cleanup warnings in mm.c

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
19 years ago[IA64] Fix a bug in vmx_vcpu_pta
awilliam@xenbuild.aw [Wed, 14 Jun 2006 22:05:43 +0000 (16:05 -0600)]
[IA64] Fix a bug in vmx_vcpu_pta

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
19 years ago[IA64] Remove redundant ASSIGN_DOMAIN_MACH_PAGE in dom_fw.c
awilliam@xenbuild.aw [Wed, 14 Jun 2006 22:05:42 +0000 (16:05 -0600)]
[IA64] Remove redundant ASSIGN_DOMAIN_MACH_PAGE in dom_fw.c

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
19 years ago[IA64] Fix vga acceleration for VTI domain
awilliam@xenbuild.aw [Tue, 13 Jun 2006 21:05:33 +0000 (15:05 -0600)]
[IA64] Fix vga acceleration for VTI domain

Now guest vhpt table of VMX domain is searched to insert some
entry into vtlb on the fly. However previous guard on memory
attribute is only done for guest itc.d emulation. That breaks
VGA acceleration and this patch fixes it by moving check to
right place.

Signed-off-by Kevin Tian <kevin.tian@intel.com>

19 years ago[IA64] Pull changes from xen-unstable.hg cset 10242 into mm.c
awilliam@xenbuild.aw [Tue, 13 Jun 2006 19:13:39 +0000 (13:13 -0600)]
[IA64] Pull changes from xen-unstable.hg cset 10242 into mm.c

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] Remove Makefile entry for xenia64_init
awilliam@xenbuild.aw [Tue, 13 Jun 2006 18:50:47 +0000 (12:50 -0600)]
[IA64] Remove Makefile entry for xenia64_init

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years agomerge with xen-unstable.hg
awilliam@xenbuild.aw [Tue, 13 Jun 2006 18:12:24 +0000 (12:12 -0600)]
merge with xen-unstable.hg

19 years ago[IA64] Define mfn_to_local_pfn()
awilliam@xenbuild.aw [Tue, 13 Jun 2006 17:41:05 +0000 (11:41 -0600)]
[IA64] Define mfn_to_local_pfn()

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] define virt_to_mfn and mfn_to_virt
awilliam@xenbuild.aw [Tue, 13 Jun 2006 15:35:43 +0000 (09:35 -0600)]
[IA64] define virt_to_mfn and mfn_to_virt

These are necessary to build w/ current xen-unstable

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] Revert xen-ia64-unstable.hg cset 10237
awilliam@xenbuild.aw [Tue, 13 Jun 2006 15:00:32 +0000 (09:00 -0600)]
[IA64] Revert xen-ia64-unstable.hg cset 10237

back out the change set 10237 which causes domain creation failure.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] Revert xen-ia64-unstable.hg cset 10238
awilliam@xenbuild.aw [Tue, 13 Jun 2006 14:59:26 +0000 (08:59 -0600)]
[IA64] Revert xen-ia64-unstable.hg cset 10238

back out the change set 10238 which causes domU creation failure.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] cleanup warning in xen/arch/ia64/linux-xen/time.c
awilliam@xenbuild.aw [Tue, 13 Jun 2006 14:55:08 +0000 (08:55 -0600)]
[IA64] cleanup warning in xen/arch/ia64/linux-xen/time.c

Remove a wrong cleanup in xen/arch/ia64/linux-xen/time.c
itc_ratio.num and itc_ratio.den are defined u64
in xen/include/asm-ia64/linux-xen/asm/pal.h.
These are the below.

typedef struct pal_freq_ratio {
        u64 den : 32, num : 32; /* numerator & denominator */
} itc_ratio, proc_ratio;

Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
19 years ago[IA64] Update efi.c and rework xenheap location
awilliam@xenbuild.aw [Tue, 13 Jun 2006 14:45:22 +0000 (08:45 -0600)]
[IA64] Update efi.c and rework xenheap location

This is a port of a newer upsteam efi.c to xen/ia64.  For the most
part, this patch is simply incorporating this upstream linux-ia64
patch into the tree:

http://www.kernel.org/hg/linux-2.6/?cs=fb781f6d3e81

To support this new code, xensetup needed to be modified to relocate
the dom0 kernel and initrd images without using efi_memmap_walk() as
this can no longer be called until after reserve_memory().  The dom0
kernel and initrd images are now only moved if necessary and the xen
MDT entry is expanded to cover the xenheap area and any relocated dom0
bits.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[HVM] Fix ioemu build with new Linux headers. We must define __user
kaf24@firebug.cl.cam.ac.uk [Tue, 13 Jun 2006 10:41:15 +0000 (11:41 +0100)]
[HVM] Fix ioemu build with new Linux headers. We must define __user
attribute to nothing.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Fix compatibility with future guests which may try to
kaf24@firebug.cl.cam.ac.uk [Tue, 13 Jun 2006 10:28:20 +0000 (11:28 +0100)]
[XEN] Fix compatibility with future guests which may try to
use hypercalls >= NR_hypercalls. These must fail with ENOSYS,
but the current strategy of masking off the high-order bits of
the hypercall number means we instead map those hypercalls onto
lower-numbered hypercalls with unpredictable results. This patch
replaces masking with an explicit compare-and-jump.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Correctly return the results of {event_channel_op,physdev_op}_compat
Ian.Campbell@xensource.com [Tue, 13 Jun 2006 09:14:20 +0000 (10:14 +0100)]
[LINUX] Correctly return the results of {event_channel_op,physdev_op}_compat

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years ago[LINUX] Fix code indentation in Linux drivers.
kfraser@dhcp93.uk.xensource.com [Mon, 12 Jun 2006 17:32:47 +0000 (18:32 +0100)]
[LINUX] Fix code indentation in Linux drivers.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoInitialize the entire hypercall page when running a ring0 kernel
Ian.Campbell@xensource.com [Mon, 12 Jun 2006 17:23:42 +0000 (18:23 +0100)]
Initialize the entire hypercall page when running a ring0 kernel

Signed-off-by: Ian Campbell <ian.campbell@xensource.com>
19 years agoFix race in device resume path - need to ensure we add the watch only
shand@chelmsford.uk.xensource.com [Mon, 12 Jun 2006 16:56:20 +0000 (17:56 +0100)]
Fix race in device resume path - need to ensure we add the watch only
after the device-specific resume code has run. Also removed some unused /
usless code from netfront.c.

Signed-off-by: Steven Hand <steven@xensource.com>
19 years ago[LINUX] Fix interaction between idle loop and RCU subsystem.
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 13:17:05 +0000 (14:17 +0100)]
[LINUX] Fix interaction between idle loop and RCU subsystem.

There is a problem with the current implementation of stop_hz_timer in
arch/i386/kernel/time-xen.c where the hz timer can be stopped on a CPU
which has RCU callbacks pending.

This patch backports a new RCU API created to fix this problem for the
s390 implementation of stop_hz_timer and also updates the time-xen.c
implementation of stop_hz_timer to call the new API.

Signed-off-by: Harry Butterworth <butterwo@uk.ibm.com>
19 years ago[HVM][VMX] Fix error-detection inline asm code. Zero word-sized
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 11:01:32 +0000 (12:01 +0100)]
[HVM][VMX] Fix error-detection inline asm code. Zero word-sized
register before executing SETNA instruction which updates bottom
byte.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM][VMX] Fix the build with certain versions of gcc.
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 09:09:44 +0000 (10:09 +0100)]
[HVM][VMX] Fix the build with certain versions of gcc.
Restrict register choices to this which are byte addressable.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Fix read_console_ring() when passed a small buffer.
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 09:05:55 +0000 (10:05 +0100)]
[XEN] Fix read_console_ring() when passed a small buffer.
From: Akio Takebe <takebe_akio@jp.fujitsu.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Clean up unused variable in mm/memory.c.
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 08:57:23 +0000 (09:57 +0100)]
[LINUX] Clean up unused variable in mm/memory.c.
Signed-off-by: Akio Takebe <takebe_akio@jp.fujitsu.com>
19 years ago[HVM][VMX] Provide right view of cpuid to the HVM guests.
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 08:45:03 +0000 (09:45 +0100)]
[HVM][VMX] Provide right view of cpuid to the HVM guests.
Some of the CPU features such as APIC, PAE, MTRR, HT are virtualized;
while others are not virtualized yet such as TM1, TM2, MCA and there are
some features which do not need virtualization such as MMX. With the
patch Guest sees only those processor features in the cpuid which are
virtualized in the hyper visor, or do not need any virtualization in
hypervisor.

Signed-off-by: Nitin A Kamble <nitin.a.kamble@intel.com>
Signed-off-by: Jun Nakajima <jun.nakajima@intel.com>
Signed-off-by: Asit Mallick <asit.k.mallick@intel.com>
19 years ago[HVM][DM] Backport the USB support from QEMU 0.8.1 to the current Xen
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 08:06:55 +0000 (09:06 +0100)]
[HVM][DM] Backport the USB support from QEMU 0.8.1 to the current Xen
device model. To support USB there are two new optional config lines
that can be added to the guest config file:

    usb=1
        This will enable USB without defining a specific USB device.
        This option is assumed and not needed if the `usbdevice' option
        is given.

    usbdevice='device'
        This will enable USB and also enable support for the given device.
        Currently, the only two devices are `mouse' (a PS/2 mouse) and
        `tablet' (an absolute pointing device).  The advantage of `tablet'
        is that Windows guests will automatically recognize and support this
        device so specifying the config line:

                usbdevice='tablet'

        will create a mouse that works transparently with Windows guests
        under VNC.  (Linux doesn't recognize the USB tablet yet so Linux
        guests under VNC will still need the Summagraphics emulation.)

Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
19 years ago[IA64] Fix a typo in local_event_delivery_enable().
kaf24@firebug.cl.cam.ac.uk [Mon, 12 Jun 2006 07:53:38 +0000 (08:53 +0100)]
[IA64] Fix a typo in local_event_delivery_enable().
Signed-off-by: Kevin Tian <kevin.tian@intel.com>
19 years ago[XEN] Fix SCHEDOP_poll to work even when event channels are
kaf24@firebug.cl.cam.ac.uk [Sun, 11 Jun 2006 18:23:31 +0000 (19:23 +0100)]
[XEN] Fix SCHEDOP_poll to work even when event channels are
not bound to the polling VCPU.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM][VMX] Cleanups and fixes to VMCS lifecycle.
kaf24@firebug.cl.cam.ac.uk [Sun, 11 Jun 2006 13:33:16 +0000 (14:33 +0100)]
[HVM][VMX] Cleanups and fixes to VMCS lifecycle.
 1. Maintain a 'launched' software flag to select between
    VMLAUNCH and VMRESUME.
 2. Take more care with VMPTRLD/VMCLEAR.
Also various other fixes (e.g., safe testing of
condition codes after executing a VMX instruction).

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Fix IRQ SMP affinity logic for event channels.
kaf24@firebug.cl.cam.ac.uk [Sun, 11 Jun 2006 08:54:35 +0000 (09:54 +0100)]
[LINUX] Fix IRQ SMP affinity logic for event channels.
The logic now mimics native x86 behaviour: a request to change
affinity via /proc is held until the next interrupt on that
event channel. So /proc/irq/n/smp_affinity may not change
immediately!
Other notes:
 1. CPU-specific interrupts silently ignore requests to change
    affinity. For example, resched0, timer0, callfunc0, ...
 2. Reading smp_affinity always returns a cpumask containing
    a single cpu. An event channel can only be bound to a single
    cpu at a time. Neither Xen nor XenLinux implement IRQ
    balancing: requires a user-space balancing daemon.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] Replace direct common-code access of evtchn_upcall_mask
kaf24@firebug.cl.cam.ac.uk [Sat, 10 Jun 2006 10:07:11 +0000 (11:07 +0100)]
[XEN] Replace direct common-code access of evtchn_upcall_mask
with local_event_delivery_* accessors.
Notes:
 1. Still some (read-only, debug) use in keyhandler.c
 2. Still accesses through current->vcpu_info.
Both above may need to be compiled only for architectures
that use event channels.

Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Remove the only use of evtchn_upcall_mask in common code.
kaf24@firebug.cl.cam.ac.uk [Sat, 10 Jun 2006 10:05:11 +0000 (11:05 +0100)]
[LINUX] Remove the only use of evtchn_upcall_mask in common code.
Replace with an assertion of irq_disabled().
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[IA64] Change PIB size to 2M
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:40:31 +0000 (10:40 -0600)]
[IA64] Change PIB size to 2M

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
19 years ago[IA64] A fix for itc.d emulation
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:45 +0000 (10:35 -0600)]
[IA64] A fix for itc.d emulation

If natpage, insert into TLB directly.

Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
19 years ago[IA64] add seqlock to protect vtlb
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:43 +0000 (10:35 -0600)]
[IA64] add seqlock to protect vtlb

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] remove some races between the p2m table and the m2p table
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:42 +0000 (10:35 -0600)]
[IA64] remove some races between the p2m table and the m2p table

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] passthrough EFI_ACPI_MEMORY_NVS and EFI_RESERVED_TYPE
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:41 +0000 (10:35 -0600)]
[IA64] passthrough EFI_ACPI_MEMORY_NVS and EFI_RESERVED_TYPE

According to the EFI spec, firmware may describe ACPI tables loaded
at runtime in EFI_RESERVED_TYPE or EFI_ACPI_MEMORY_NVS memory ranges.
This patch adds these to the list of memory types we pass through for
dom0.  This allows Xen to boot on HP Superdomes.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] use get_gpfn_from_mfn()
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:40 +0000 (10:35 -0600)]
[IA64] use get_gpfn_from_mfn()

clean up vmx_vcpu_tpa() and mfn_to_gmfn(). don't access mpt_table directly.
use get_gpfn_from_mfn()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] use pte_mem() in relinquish_pte()
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:39 +0000 (10:35 -0600)]
[IA64] use pte_mem() in relinquish_pte()

use pte_mem instread of direct bit test in relinquish_pte()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] add memory barrier to domain_flush_vtlb_range()
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:38 +0000 (10:35 -0600)]
[IA64] add memory barrier to domain_flush_vtlb_range()

add memory barrier to domain_flush_vtlb_range().
vtlb purge must be visible before vhpt invalidation.
added some BUG_ON().

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] Add NULL test in domain_page_mapped()
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:37 +0000 (10:35 -0600)]
[IA64] Add NULL test in domain_page_mapped()

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
19 years ago[IA64] align pages in assign_domain_same_page()
awilliam@xenbuild.aw [Fri, 9 Jun 2006 16:35:36 +0000 (10:35 -0600)]
[IA64] align pages in assign_domain_same_page()

Fix a bug. potential miss of page assignment for domain.
If mpaddr and size are not aligned well, the last page might be not
assigned for the domain.

Signed-off-by: Kouya Shimura <kouya@jp.fujitsu.com>
19 years ago[XEN] VCPU operation register_runstate should work even when
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 16:05:09 +0000 (17:05 +0100)]
[XEN] VCPU operation register_runstate should work even when
called from non-local VCPU. Necessary as Linux always calls
this operation from VCPU0 during secondary-VCPU bringup.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[ACM] Replace enumerations with macros with qualified names.
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 15:49:49 +0000 (16:49 +0100)]
[ACM] Replace enumerations with macros with qualified names.
Old unqualified enumeration names polluted the global namespace.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN][ACM] Clean up ACM interface to use explicitly-sized types
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 15:26:05 +0000 (16:26 +0100)]
[XEN][ACM] Clean up ACM interface to use explicitly-sized types
and guest handles.
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
19 years ago[LINUX] Simplify /proc/iomem initialisation -- no need to fake a
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 15:19:42 +0000 (16:19 +0100)]
[LINUX] Simplify /proc/iomem initialisation -- no need to fake a
domU memory map. The main e820 map already terminates at max_pfn.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX][X86/64] Initialise pages outside initial allocation so that
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 15:18:40 +0000 (16:18 +0100)]
[LINUX][X86/64] Initialise pages outside initial allocation so that
they are picked up by the balloon driver.
From: Jan Beulich
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[XEN] IOPL is ignored for VM86 mode port accesses. Fix Xen
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 13:29:00 +0000 (14:29 +0100)]
[XEN] IOPL is ignored for VM86 mode port accesses. Fix Xen
emulation to match native behaviour.
Signed-off-by: Jan Beulich <jbeulich@novel..com>
19 years ago[LINUX][XENBUS] replace xenbus_transaction_t with an opaque transaction ID.
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 13:25:46 +0000 (14:25 +0100)]
[LINUX][XENBUS] replace xenbus_transaction_t with an opaque transaction ID.
xenbus_transaction_t -> struct xenbus_transaction, which just contains
a single u32.  Also renamed XBT_NULL to XBT_NIL to emphasize that it
isn't a NULL pointer, but a NIL transaction ID.  Compile and boot tested.

Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com>
[chrisw: updated for xen-unstable from patchqueue]
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
19 years ago[LINUX][XENBUS] Drop (struct xenbus_device)->data, and simply use ->dev.driver_data
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 13:23:50 +0000 (14:23 +0100)]
[LINUX][XENBUS] Drop (struct xenbus_device)->data, and simply use ->dev.driver_data
instead, since that's what it is there for.  Similar to patch
in patchqueue started by Jeremy, and expanded by me to include all
relevant drivers in xen-unstable.

Cc: Jeremy Fitzhardinge <jeremy@xensource.com>
Signed-off-by: Chris Wright <chrisw@sous-sol.org>
19 years ago[LINUX][BLKTAP] This code doesn't compile, is marked as DANGEROUS, and
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 13:20:09 +0000 (14:20 +0100)]
[LINUX][BLKTAP] This code doesn't compile, is marked as DANGEROUS, and
is said to be removed when block drivers use grant tables.
So let's remove it.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
19 years ago[LINUX] Use structs not typedefs, remove trailing whitespaces, place symbol
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 13:13:18 +0000 (14:13 +0100)]
[LINUX] Use structs not typedefs, remove trailing whitespaces, place symbol
EXPORTs with functions, order includes, eliminate unsed macros, don't
initialize static data to NULL, etc.  Cleanups from patchqueue.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
19 years ago[NET] front: There's a small leak on a couple error paths in setup_device().
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 13:10:32 +0000 (14:10 +0100)]
[NET] front: There's a small leak on a couple error paths in setup_device().
While there rearrange the ring setup order slightly to simplify error
path since netif_free() will cleanup once ring_ref is valid.  And use
get_zeroed_page() instead of __get_free_page()/memset().  Handle error if
bind_evtchn_to_irqhandler() fails, as bad info->irq value is likely to
cause oops later.  In create_device(), gnttab_free_grant_references()
is accidentally called twice on tx_head during cleanup from failed
gnttab_alloc_grant_references() on rx_head, which could corrupt
gnttab_free_count.

Signed-off-by: Chris Wright <chrisw@sous-sol.org>
19 years ago[XEN] Re-increase MAX_ORDER to 20 for the time being. Reducing
kaf24@firebug.cl.cam.ac.uk [Fri, 9 Jun 2006 07:15:58 +0000 (08:15 +0100)]
[XEN] Re-increase MAX_ORDER to 20 for the time being. Reducing
breaks domain0 builder.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[IA64] Put guest physical translation into VHPT
awilliam@xenbuild.aw [Thu, 8 Jun 2006 17:08:35 +0000 (11:08 -0600)]
[IA64] Put guest physical translation into VHPT

Signed-off-by: Anthony Xu <anthony.xu@intel.com>
19 years ago[IA64] Enable SMP on VTI-Domain
awilliam@xenbuild.aw [Thu, 8 Jun 2006 17:00:09 +0000 (11:00 -0600)]
[IA64] Enable SMP on VTI-Domain

Signed-off-by: Anthony Xu < anthony.xu@intel.com >
19 years ago[IA64] sparse tree cleanups
awilliam@xenbuild.aw [Thu, 8 Jun 2006 16:17:22 +0000 (10:17 -0600)]
[IA64] sparse tree cleanups

 Here's a first pass at some sparse tree cleanups based on feedback
 we've gotten on linux-ia64.  I haven't taken all of the comments into
 account yet, this is just a start.  Specific changes:

  - CONFIG_ARCH_XEN is no longer necessary
  - simple is_running_on_xen() checks can be handled w/o CONFIG_XEN
  - pulled forward a drivers/xen/Makefile change that broken make clean
  - changed some comments from C++ style to C
  - turned HYPERVISOR_ioremap into a macro for !CONFIG_XEN
  - made hypervisor.h and privop.h include-able for !CONFIG_XEN

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] clean out xen/drivers/patches in the sparse tree
awilliam@xenbuild.aw [Thu, 8 Jun 2006 16:15:09 +0000 (10:15 -0600)]
[IA64] clean out xen/drivers/patches in the sparse tree

This is all old, unused code.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[XEN] Reduce default maximum allocation order from 2^20 pages to 2^11.
kaf24@firebug.cl.cam.ac.uk [Thu, 8 Jun 2006 15:51:39 +0000 (16:51 +0100)]
[XEN] Reduce default maximum allocation order from 2^20 pages to 2^11.
On x86 this corresponds to a maximum aligned contiguous allocation of 8MB.
This can be overridden by architectures if need be.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] swiotlb allocates multiple smaller contiguous DMA regions,
kaf24@firebug.cl.cam.ac.uk [Thu, 8 Jun 2006 15:48:23 +0000 (16:48 +0100)]
[LINUX] swiotlb allocates multiple smaller contiguous DMA regions,
rather than a single big one.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoAdd sched-credit xm tests but don't run them by default yet...
ack@localhost.localdomain [Thu, 8 Jun 2006 10:35:27 +0000 (11:35 +0100)]
Add sched-credit xm tests but don't run them by default yet...
Signed-off-by: Emmanuel Ackaouy <ack@xensource.com>
19 years ago[LINUX] Set up /proc/iomem in a sensibel way to indicate
kaf24@firebug.cl.cam.ac.uk [Thu, 8 Jun 2006 09:24:48 +0000 (10:24 +0100)]
[LINUX] Set up /proc/iomem in a sensibel way to indicate
code & data resources, and a RAM area on domU.
From: Gerd Hoffmann <kraxel@suse.de>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Only trigger unhandled irq path if irq is not shared across
kaf24@firebug.cl.cam.ac.uk [Thu, 8 Jun 2006 09:11:04 +0000 (10:11 +0100)]
[LINUX] Only trigger unhandled irq path if irq is not shared across
multiple guests (another guest may have handled the interrupt).
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[TOOLS] Fix domain builder to carefully check that mapped memory area
kaf24@firebug.cl.cam.ac.uk [Thu, 8 Jun 2006 08:52:04 +0000 (09:52 +0100)]
[TOOLS] Fix domain builder to carefully check that mapped memory area
does not overflow and wrap to zero.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoFix cut-n-paste comment error in public header file.
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 14:51:56 +0000 (15:51 +0100)]
Fix cut-n-paste comment error in public header file.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoExtended PHYSDEVOP_irq_status_query to obtain sharing status
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 14:46:05 +0000 (15:46 +0100)]
Extended PHYSDEVOP_irq_status_query to obtain sharing status
(bound to multiple guests?).
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[LINUX] Rename hw_resend_irq to allow it to be defined seperately per arch.
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 13:38:36 +0000 (14:38 +0100)]
[LINUX] Rename hw_resend_irq to allow it to be defined seperately per arch.
Signed-off-by Kevin Tian <kevin.tian@intel.com>

19 years ago[HVM][MMIO] Support decode of 0x83 opcode (or imm8,m32/64').
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 13:21:49 +0000 (14:21 +0100)]
[HVM][MMIO] Support decode of 0x83 opcode (or imm8,m32/64').
This instruction is used by both WinXP during an SMP installation and by
Sun Solaris.  With this patch Sun Solaris UP is able to boot.  Windows
SMP gets a bit further but still has issues.

Signed-off-by: Tom Woller <thomas.woller@amd.com>
Signed-off-by: Travis Betak <tbetak.woller@amd.com>
19 years ago[HVM][MMIO] Emulate more instructions: or/and/xor with byte width,
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 13:20:29 +0000 (14:20 +0100)]
[HVM][MMIO] Emulate more instructions: or/and/xor with byte width,
and load string (LODS) instructions.

Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Yunfeng zhao <yunfeng.zhao@intel.com>
Signed-off-by: Xin Li <xin.b.li@intel.com>
19 years ago[HVM][DM] Cleaner way of clearing VGA memory on mode changes (thanks to
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 13:13:22 +0000 (14:13 +0100)]
[HVM][DM] Cleaner way of clearing VGA memory on mode changes (thanks to
Fabrice Bellard on the QEMU project). This patch clears the
memory in the BIOS call rather than when the Cirrus Logic register changes,
which more closely matches what happens on the real hardware.

Signed-off-by: Don Dugger <donald.d.dugger@intel.com>
19 years ago[LIBXC] Convert all printf/fprintf uses to use a macro instead.
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 13:07:36 +0000 (14:07 +0100)]
[LIBXC] Convert all printf/fprintf uses to use a macro instead.
Thus all can be disabled at compile time. It would be easy to
make enabling/disabling a run-time option too.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[HVM][PIT] Fix missed_ticks() logic.
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 12:42:21 +0000 (13:42 +0100)]
[HVM][PIT] Fix missed_ticks() logic.
Signed-off-by Xiaowei Yang <xiaowei.yang@intel.com>

19 years ago[LINUX][X86/64] Support IO-port permissions bitmaps (ioperm() syscall).
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 12:38:08 +0000 (13:38 +0100)]
[LINUX][X86/64] Support IO-port permissions bitmaps (ioperm() syscall).
Signed-off-by: Jan Beulich <jbeulich@novell.com>
19 years agox86/64 Linux: destroy entire init memory mapping beyond kernel image.
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 10:24:44 +0000 (11:24 +0100)]
x86/64 Linux: destroy entire init memory mapping beyond kernel image.
Avoids overlap with modules mapping area.
Signed-off-by: Jan Beulich <jbeulich@novell.com>
19 years agoMerged.
emellor@leeni.uk.xensource.com [Wed, 7 Jun 2006 10:03:51 +0000 (11:03 +0100)]
Merged.

19 years agoFix typo.
emellor@leeni.uk.xensource.com [Wed, 7 Jun 2006 10:03:15 +0000 (11:03 +0100)]
Fix typo.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoAdded.
emellor@leeni.uk.xensource.com [Wed, 7 Jun 2006 09:58:09 +0000 (10:58 +0100)]
Added.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years agoMove forward to new version of buildroot -- the old one has gone from the
emellor@leeni.uk.xensource.com [Wed, 7 Jun 2006 09:57:25 +0000 (10:57 +0100)]
Move forward to new version of buildroot -- the old one has gone from the
website.

Signed-off-by: Ewan Mellor <ewan@xensource.com>
19 years ago[HVMLOADER] Revert to uniprocessor MPS table in rombios.
kaf24@firebug.cl.cam.ac.uk [Wed, 7 Jun 2006 08:59:56 +0000 (09:59 +0100)]
[HVMLOADER] Revert to uniprocessor MPS table in rombios.
Advertising more CPUs than the guest is allocated hangs boot
of Windows XP (selects wrong HAL). The correct fix here is
to dynamically generate the MPS table (at least the CPU
entries) from hvmloader binary.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[IA64] merge efi_emul.c into fw_emul.c and clean up
awilliam@xenbuild.aw [Tue, 6 Jun 2006 15:11:25 +0000 (09:11 -0600)]
[IA64] merge efi_emul.c into fw_emul.c and clean up

Merge efi_emul.c into fw_emul.c
Clean up: replace some goto with return.
Declare translate_mpa_to_imva in mm.h and as void *.

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[IA64] remove xenia64_init.c
awilliam@xenbuild.aw [Tue, 6 Jun 2006 15:06:19 +0000 (09:06 -0600)]
[IA64] remove xenia64_init.c

Relocate the few bits left to ia64 specific parts of the tree.

Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[IA64] Fix network issue on VTI domain
awilliam@xenbuild.aw [Tue, 6 Jun 2006 15:01:38 +0000 (09:01 -0600)]
[IA64] Fix network issue on VTI domain

Clean up event wait sequence in io emulation path, as a critical
fix to a severe issue where VTI domain may fall into block state
when doing bulk network transfer.

Signed-off-by Kevin Tian <kevin.tian@intel.com>

19 years agoUse explicitly-sized types in the dom0_ops and privcmd structures.
kaf24@firebug.cl.cam.ac.uk [Tue, 6 Jun 2006 09:25:59 +0000 (10:25 +0100)]
Use explicitly-sized types in the dom0_ops and privcmd structures.
As discussed previously, the these operations are not performance-sensitive, so
the additional cache footprint shouldn't be an issue.

Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
19 years agoRepresent PFNs with their own type, rather than 'unsigned long'.
kaf24@firebug.cl.cam.ac.uk [Tue, 6 Jun 2006 08:48:17 +0000 (09:48 +0100)]
Represent PFNs with their own type, rather than 'unsigned long'.
('long' changes size and alignment between 32- and 64-bit ABIs.)
Signed-off-by: Hollis Blanchard <hollisb@us.ibm.com>
19 years ago[NET] front: Turn grant-ref error into a fatal bug. That's the best we
kfraser@dhcp93.uk.xensource.com [Tue, 6 Jun 2006 07:21:31 +0000 (08:21 +0100)]
[NET] front: Turn grant-ref error into a fatal bug. That's the best we
can do until we have a backend driver recovery method.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[X86EMUL] Mark MOV instruction as not needing writeback.
kfraser@dhcp93.uk.xensource.com [Tue, 6 Jun 2006 07:05:13 +0000 (08:05 +0100)]
[X86EMUL] Mark MOV instruction as not needing writeback.
Fix the test harness for x86/64 -- map emulated addresses
to low 4GB of address space.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[IA64] more cleanup
awilliam@xenbuild.aw [Mon, 5 Jun 2006 20:28:39 +0000 (14:28 -0600)]
[IA64] more cleanup

Clean-up: fw_emul.c created.
More definitions moved to mm.c
process.c is lighter and renamed to faults.c

Signed-off-by: Tristan Gingold <tristan.gingold@bull.net>
19 years ago[IA64] pass vcpu nr to guest firmware
awilliam@xenbuild.aw [Mon, 5 Jun 2006 20:23:57 +0000 (14:23 -0600)]
[IA64] pass vcpu nr to guest firmware

This patch pass the vcpus number to VT-i domain guest firmware,
so that guest firmware can set SMP info accordingly, mostly in
ACPI MADT table.

This patch is required by VT-i  SMP support.

Signed-off-by: Yu Ke <ke.yu@intel.com>
19 years ago[IA64] This patch fixes dom0 no VGA console bug.
awilliam@xenbuild.aw [Mon, 5 Jun 2006 20:21:37 +0000 (14:21 -0600)]
[IA64] This patch fixes dom0 no VGA console bug.

After enabling dom0_vp mode, we lost the VGA console.
The reason is that VGA frame buffer(0xa0000-0xc0000) was set
to conventional memory not IO in dom0's p2m table.

Low conventional memory ranges are also given MDT entries for
dom0 to allow Linux to properly detect whether VGA is present.

Signed-off-by: Zhang xiantao <xiantao.zhang@intel.com>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>
19 years ago[HVM][VMX] Interrupts must be kept disabled when entering Xen for
kaf24@firebug.cl.cam.ac.uk [Mon, 5 Jun 2006 16:17:27 +0000 (17:17 +0100)]
[HVM][VMX] Interrupts must be kept disabled when entering Xen for
external interrupt processing. Remove code that immediately
reenabled interrupt delivery on VMEXIT.
Signed-off-by: Seteven Smith <sos22@cam.ac.uk>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[NET] back: Add a few comments to the goriest parts of the scatter-gather patch.
kaf24@firebug.cl.cam.ac.uk [Mon, 5 Jun 2006 16:03:19 +0000 (17:03 +0100)]
[NET] back: Add a few comments to the goriest parts of the scatter-gather patch.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[NET] front: Transmit SG packets if supported
kaf24@firebug.cl.cam.ac.uk [Mon, 5 Jun 2006 15:33:49 +0000 (16:33 +0100)]
[NET] front: Transmit SG packets if supported

This patch adds scatter-and-gather transmission support to the frontend.
This allows the MTU to be raised right now and the potential for TSO in
future.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years ago[NET] back: Add SG support
kaf24@firebug.cl.cam.ac.uk [Mon, 5 Jun 2006 15:13:47 +0000 (16:13 +0100)]
[NET] back: Add SG support

This patch adds scatter-and-gather support to the backend.  It also
advertises this fact through xenbus so that the frontend can detect
this and send through SG requests only if it is supported.

SG support is required to support skb's larger than one page.  This
in turn is needed for either jumbo MTU or TSO.  One of these is
required to bring local networking performance up to a level that
is acceptable.

Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
19 years ago[VMXASSIST] Extensions to vmxassist to handle additional mode switch cases.
kaf24@firebug.cl.cam.ac.uk [Mon, 5 Jun 2006 14:18:13 +0000 (15:18 +0100)]
[VMXASSIST] Extensions to vmxassist to handle additional mode switch cases.

Extends vmxassist to handle two cases related to mode switching found
while experimenting with different boot loaders.

The first case is use of the JMP instruction with memory location
operands to complete a switch to protected mode. This patch adds
emulation for this form of the JMP instruction to vmxassist.

The second case is where boot loader code does not save/restore a
non-zero SS register across a protected mode traversal.
Zeroing the SS register in vmxassist results in all sorts of problems
in the domU after returning back to real mode. This patch stores
segment register values before entering protected mode and correctly
restores the old values (instead of an incorrect zero value) when
reentering real mode.

Signed-off-by: Kevin Tronkowski <ktronkowski@virtualiron.com>
19 years ago[NET] back: fix synchronisation of access to deallocation buffer ring.
kaf24@firebug.cl.cam.ac.uk [Mon, 5 Jun 2006 14:14:58 +0000 (15:14 +0100)]
[NET] back: fix synchronisation of access to deallocation buffer ring.
Must ensure ring is written to before producer index is incremented.
Bug diagnosed by Ky Srinivasan <ksrinivasan@novell.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoExtend callback-registration hypercall to take a flags argument.
kaf24@firebug.cl.cam.ac.uk [Mon, 5 Jun 2006 13:35:22 +0000 (14:35 +0100)]
Extend callback-registration hypercall to take a flags argument.
This can currently be used to request that event delivery be
disabled during callback processing.
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years agoCreate new vmassist type 'pae_extended_cr3'. Only advertise
kaf24@firebug.cl.cam.ac.uk [Mon, 5 Jun 2006 09:42:40 +0000 (10:42 +0100)]
Create new vmassist type 'pae_extended_cr3'. Only advertise
pae_pgdir_above_4gb tp guests that have enabled this vmassist.
Control tools ensure all PAE page directories are below 4GB
unless the vmassist is enabled (triggered via an extended-cr3
option in guest Elf header).
Signed-off-by: Keir Fraser <keir@xensource.com>
19 years ago[IA64] check memory descriptor over lap in dom_fw_init()
awilliam@xenbuild.aw [Sat, 3 Jun 2006 22:06:23 +0000 (16:06 -0600)]
[IA64] check memory descriptor over lap in dom_fw_init()

check memory descriptor over lap in dom_fw_init() and
assign page to dom0 precisely.

Signed-off-by: Isaku Yamahata <yamahata@valinux.co.jp>
Signed-off-by: Alex Williamson <alex.williamson@hp.com>